﻿using NLog;
using NLog.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhonTai.Industry.Contracts.Core.Model;

namespace ZhonTai.Industry.Removable.CraftGather
{
    /// <summary>
    /// 共用内容
    /// </summary>
    public abstract class WorkExecuteBase
    {
        protected Logger logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();

        /// <summary>
        /// 执行任务
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public abstract Task ExecuteAsync(PushContent content);

        /// <summary>
        /// PLC方工站代号
        /// </summary>
        /// <param name="stationId"></param>
        /// <returns></returns>
        protected short StationAvatar(long stationId)
        {
            switch (stationId)
            {
                case 500000000000001:
                    return 12001;

                default:
                    return -1;
            }
        }
    }
}